<form id="question-search-form" class="form-inline well well-sm" action="{{ path('course_set_manage_question_picker', {id:courseSet.id,targetType:'testpaper',replace:replace}) }}" novalidate>
  <div class="form-group">
    <select class="form-control width-150" name="courseId" data-url="{{ path('course_set_manage_show_tasks',{courseSetId:courseSet.id})}}">
      <option value="0" {% if not app.request.get('courseId',0) %}selected{% endif %}>{{'course.testpaper_manage.create.range.course'|trans}}</option>
      {% for course in courses if course %}
        <option value="{{ course.id }}" {% if app.request.get('courseId','') == course.id %}selected{% endif %}>{{ get_course_title(course) }}</option>
      {% endfor %}
    </select>
    <select class="form-control width-150" {% if not courseTasks|default(null) %}style="display:none;"{% endif %} name="lessonId">
      <option value="0" {% if not app.request.get('lessonId',0) %}selected{% endif %}>{{'course.question_manage.filter.keywor
      course.testpaper_manage.create.range.choose'|trans}}</option>
      {% for task in courseTasks|default([]) if task %}
        <option value="{{ task.id }}" {% if app.request.get('lessonId','') == task.id %}selected{% endif %}>{{ task.title }}</option>
      {% endfor %}
    </select>
  </div>

  <div class="form-group">
    <input type="text" id="keyword" name="keyword" class="form-control" value="{{ app.request.query.get('keyword') }}" placeholder="{{'course.question_manage.filter.keywords'|trans}}">
  </div>

  <input type="hidden" name="excludeIds" value="{{ conditions.excludeIds|default('')|join(',')|default(null) }}">
  <input type="hidden" name="type" value="{{ conditions.type|default(null)}}">

  <button class="btn btn-primary btn-sm search-question-btn" data-role="search-btn">{{'form.btn.search'|trans}}</button>

</form>
